package ua.keeper.query;

import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.Toast;

public class DocHListActivity extends ListActivity
{
	private int clientId_ = 0;
	private DocHList list_;
	private DocHListAdapter adapter_;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
    	super.onCreate(savedInstanceState);
    	
    	clientId_ = Integer.parseInt(getIntent().getExtras().getString("clientId"));
    	
    	QueryApp appState = ((QueryApp)getApplicationContext());
    	list_ = new DocHList(appState.getDataBase(), clientId_);
    	
    	adapter_ = new DocHListAdapter(this, R.layout.doc_h_list_row, list_.list);
        
        setListAdapter(adapter_);
    }
    
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id)
    {
    	
        //String item = (String) getListAdapter().getItem(position);
        Toast.makeText(this, "<В РАЗРАБОТКЕ>", Toast.LENGTH_SHORT).show();
    }
}
